import java.io.IOException;
import javax.microedition.lcdui.*;
import widsets.Widsets;

public final class r extends Canvas
    implements Runnable
{

    private Image a;
    private long b;
    private int c[];

    public r(Widsets widsets)
    {
        setFullScreenMode(true);
        try
        {
            a = Image.createImage("/widsets.png");
            c = new int[a.getWidth() * a.getHeight()];
        }
        catch(IOException _ex) { }
        b = System.currentTimeMillis();
    }

    public final void paint(Graphics g)
    {
        int i = getWidth();
        int j = getHeight();
        g.setColor(0);
        g.fillRect(0, 0, i, j);
        g.setColor(0xffffff);
        g.fillRect(3, 3, i - 6, j - 6);
        if(a != null)
        {
            int k = (i - a.getWidth()) / 2;
            g.drawImage(a, k, 18, 20);
            int l;
            if((l = (int)(System.currentTimeMillis() - b)) <= 2000)
            {
                int i1 = (255 * (2000 - l)) / 2000 << 24 | 0xffffff;
                int ai[];
                for(int j1 = (ai = c).length - 1; j1 >= 0; j1--)
                    ai[j1] = i1;

                g.drawRGB(ai, 0, a.getWidth(), k, 18, a.getWidth(), a.getHeight(), true);
                return;
            }
            c = null;
        }
    }

    public final void run()
    {
        while(c != null) 
        {
            repaint();
            try
            {
                Thread.sleep(100L);
            }
            catch(Throwable _ex) { }
        }
    }
}